package cn.guet.spider.elong.service;

import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.springframework.stereotype.Service;

import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;

import cn.guet.spider.elong.entity.LongHotel;
import cn.guet.spider.elong.mapper.ILongHotelMapper;

/**
 * @author SAGITTAR
 */
@Service(value = "longService")
public class LongServiceImpl extends ServiceImpl<ILongHotelMapper, LongHotel> implements ILongHotelService {

    private static final Logger LOGGER = LogManager.getLogger(LongServiceImpl.class);

    @Override
    public LongHotel selectOneById(long id) {
        LOGGER.warn(String.format("%s ELongHotel", id));
        EntityWrapper<LongHotel> wrapper = new EntityWrapper<>();
        wrapper.where("id={0}", id);
        return selectOne(wrapper);
    }
}
